<template>
  <div id="baseData">
    <h1 class="con-right-title">
      基础数据
    </h1>
    <topData></topData>
    <userSource></userSource>
    <funcEnter></funcEnter>
    <userChannel></userChannel>
  </div>
</template>

<script>
import {
  getSearchList,
  exportRole,
  batchRemove,
  deleteReq
} from '@/api/system/post' // 接口
import topData from '@component/dataStatistics/baseData/com/topData' // 昨日数据
import userSource from '@component/dataStatistics/baseData/com/userSource' // 用户来源占比统计
import userChannel from '@component/dataStatistics/baseData/com/userChannel' // 用户使用频道占比统计
import funcEnter from '@component/dataStatistics/baseData/enterCom/funcEntrance' // 功能入口使用占比统计
import { saveScrollMixins } from '@/mixins/saveScroll'
import { getCreateDate } from '@utils/pubFunction'
export default {
  name: 'data',
  msg: '基础数据',
  /* mixins: [saveScrollMixins],*/
  components: {
    topData,
    userChannel,
    userSource,
    funcEnter
  },
  data() {
    return {
      multipleSelection: [],
      powerStr: 'system:baseData:list', // 是否查询的标识
      canGetList: true, // 是否可以查询列表
      powerAry: [], // 可显示的权限
      canShowPage: false // 是否显示当前页面
    }
  },
  activated() {
    /* this.toTableScrollHeight()*/
  },
  mounted() {
    // 获取权限
    // this.getPower()
    /*    this.$nextTick(() => {
      setTimeout(() => {
        this.setTableScrollHeight()
      }, 1000)
    })*/
  },
  methods: {
    /* 获取权限 */
    getPower() {
      let id = this.$route.query.mId
      this.getCurPageMenu(id).then((res) => {
        this.powerAry = res
        if (!res.includes(this.powerStr)) {
          this.canGetList = false
          this.alertPower(this.powerStr)
        } else {
          this.canShowPage = true
        }
      })
    }
  }
}
</script>

<style lang="less">
#baseData {
  height: 1900px;
  .echarts-title {
    font-size: 18px;
    font-weight: bold;
    color: #222;
    padding: 10px 0 10px 30px;
  }
  .base-col {
    float: left;
    width: 20%;
    padding: 0 5px;
    box-sizing: border-box;
  }
}
</style>
